package cn.yiyuan.car.controller;

import cn.yiyuan.base.until.AjaxResult;
import cn.yiyuan.base.until.PageInfo;
import cn.yiyuan.car.dto.Cardto;
import cn.yiyuan.car.query.CarDocQuery;
import cn.yiyuan.car.query.CarQuery;
import cn.yiyuan.car.service.ICarDocService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @user m
 * @project Car_mall_system
 * @date 2024-01-08
 * @package cn.yiyuan.car.controller
 */
@RestController
@RequestMapping("/carDoc")
public class CarDocController {
    @Autowired
    public ICarDocService service;

/**
 * 分页查询数据
 */
    @PostMapping
    public AjaxResult querypage(@RequestBody CarDocQuery carQuery){
        PageInfo<Cardto> queryPage = service.queryPage(carQuery);
        return AjaxResult.me().setData(queryPage);
    }

}
